<?php
header('content-type:text/html;charset=utf-8');
include 'functions.php';

//模式修正符i表示不区分大小写
//s表示将字符串是为单行

//$preg = '/id/is';
//$str = "的网址是百度www.bai
//du.com谷歌
//www.google.com";
//
//$re = preg_match($preg,$str);
//p($re);

$preg = '/密码是(\d+?)/e';
$str = "密码是123456";

$re = preg_replace($preg,'md5(\1)',$str);
p($re);